<?php
$this->pageHeader = t ( 'PAGE_TITLE', 'hiringCompany' );
$this->pageTitle = t ( 'PAGE_TITLE', 'hiringCompany' );
$toolbar = new LGToolbar ();
$toolbar->buttonAddNew ( '500', '450', t ( 'PAGE_TITLE_ADDNEW', 'hiringCompany' ) );
$toolbar->buttonDelete ();
$toolbar->buttonRefresh ();
$this->pageToolbar = $toolbar->mergeToolbar ();
?>

<div id="ccontent">
	<div id="message"></div>
	<!-- search-form -->
	<div class="search-form"> 														
	<?php
	$this->renderPartial ( '_search', array (
			'model' => $model 
	) );
	?>
    </div>
	<!-- grid -->
    <?php
				$this->widget ( 'GridView', array (
						'id' => 'DataGrid',
						'dataProvider' => $model->search (),
						'itemsCssClass' => 'grid',
						'summaryText' => LGHelpers::getSummary (),
						'columns' => array (
								array (
										'header' => '#',
										'class' => 'CCheckBoxColumn',
										'selectableRows' => '2',
										'htmlOptions' => array (
												'width' => '10px',
												'style' => 'text-align:center' 
										),
										'id' => 'chkId' 
								),
								array (
										'name' => 'code',
										'value' => 'CHtml::encode($data->code)',
										'header' => t ( 'LBL_CODE', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'name' => 'name',
										'value' => 'CHtml::encode($data->name)',
										'header' => t ( 'LBL_NAME', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px' 
										),
										'type' => 'raw' 
								),
								array (
										'name' => 'director',
										'value' => 'CHtml::encode($data->director)',
										'header' => t ( 'LBL_DIRECTOR', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'name' => 'address',
										'value' => 'CHtml::encode($data->address)',
										'header' => t ( 'LBL_ADDRESS', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px' 
										),
										'type' => 'raw' 
								),
								array (
										'name' => 'phone_number',
										'value' => 'CHtml::encode($data->phone_number)',
										'header' => t ( 'LBL_PHONE_NUMBER', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'name' => 'salary',
										'value' => 'CHtml::encode($data->salary)',
										'header' => t ( 'LBL_SALARY', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'name' => 'first_month_allowance',
										'value' => 'CHtml::encode($data->first_month_allowance)',
										'header' => t ( 'LBL_FIRST_MONTH_ALLOWANCE', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'name' => 'introducing_fee',
										'value' => 'CHtml::encode($data->introducing_fee)',
										'header' => t ( 'LBL_INTRODUCING_FEE', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'name' => 'management_fee',
										'value' => 'CHtml::encode($data->management_fee)',
										'header' => t ( 'LBL_MANAGEMENT_FEE', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px'
										),
										'type' => 'raw'
								),
								array (
										'header' => t ( 'LBL_UNION', 'hiringCompany' ),
										'name' => 'union_id',
										'value' => '($data->union != NULL)? $data->union->name: ""',
										'htmlOptions' => array (
												'width' => '114px',
												'align' => 'center'
										)
								),
								array (
										'name' => 'update_date',
										'header' => t ( 'LBL_UPDATE_DATE', 'hiringCompany' ),
										'htmlOptions' => array (
												'width' => '120px',
												'style' => 'text-align:center' 
										) 
								),
								array (
										'name' => 'updated_by',
										'value' => 'CHtml::encode($data->updated_by)',
										'header' => t ( 'LBL_UPDATED_BY', 'hiringCompany' ),
										'type' => 'raw',
										'htmlOptions' => array (
												'width' => '100px',
												'style' => 'text-align:center' 
										) 
								),
								array (
										'header' => t ( 'LBL_ACTION', 'hiringCompany' ),
										'headerHtmlOptions' => array (
												'width' => '10px',
												'style' => 'text-align:center' 
										),
										'value' => 'app()->controller->editDialogButtonHtml($data, t("LBL_EDIT_HIRRING_COMPANY", "hiringCompany"), 500, 500)',
										'type' => 'raw',
										'htmlOptions' => array (
												'width' => '57px',
												'align' => 'center' 
										) 
								) 
						) 
				) );
				?>
</div>
<div id="popupCreateUnion"></div>